package com.iplant.aps.service.mesenum;

/**
 *责任判定
 */
public enum SFCBOMTaskResponsibility {
	/**
	 * SCH
	 */
	Default(0, ""),
	/**
	 * 入厂状态不良(公司)
	 */
	Company(1, "入厂状态不良"),
	/**
	 * 制造过程状态不良(原厂)
	 */
	Plant(2, "制造过程状态不良"),
	/**
	 * 段改必换件
	 */
	ChangeMust(3, "段改必换件"),
	/**
	 * 必换件(厂家二选一)
	 */
	MustSelectOne(4, "必换件(厂家二选一)"),
	/**
	 * 周转件
	 */
	Turnover(5, "周转件");

	private int value;
	private String lable;

	private SFCBOMTaskResponsibility(int value, String lable) {
		this.value = value;
		this.lable = lable;
	}

	/**
	 * 通过 value 的数值获取枚举实例
	 *
	 * @param val
	 * @return
	 */
	public static SFCBOMTaskResponsibility getEnumType(int val) {
		for (SFCBOMTaskResponsibility type : SFCBOMTaskResponsibility.values()) {
			if (type.getValue() == val) {
				return type;
			}
		}
		return Default;
	}

	public int getValue() {
		return value;
	}

	public String getLable() {
		return lable;
	}
}
